Repository navigation
feat(ui): one lighter dialog surface, a single column for short create dialogs, and 「Create more」 (#35980) - #36038
Conversation
…ompact controls Dialog, AlertDialog and the form dialog's MobileDialogContent append the shared classes in packages/components/src/lib/dialog-surface.ts: a 10% overlay with no blur, a white card with a hairline edge and a 3px translucent outer ring, a 12px corner, and 32px controls from sm up. The two Shadcn primitives reach it through declared patches (alert-dialog gains its vendored registry fixture, round-trip true). The console's global [role="dialog"] corner rule is gone: popovers and the bottom drawer keep their corner by their own containers, and the shared shadow rule skips the dialog surface. The blurred overlay rule now reaches drawers only. Claude-Session: https://claude.ai/code/session_01L6bhgWL2r2CuFr34ENybDB Co-authored-by: Claude <noreply@anthropic.com>
…eader
ModalForm draws its title at 16px after the object's icon, trims the
dialog's padding to 20px (and drops the stray sm:p-6 gutter the content
kept), and saves on ⌘↵ / Ctrl+Enter, which the Save button shows as
keycaps. A host that passes createMore gets the footer switch on a create:
with it on, a save keeps the dialog open, draws the form again from its
opening values and focuses the first field, and onSuccess is told
{ createMore: true }. The switch is remembered per object in this browser.
The console's record dialog offers it, refreshes the list behind and stays
where it is instead of leaving for the new record. New label form.createMore
in every locale.
Claude-Session: https://claude.ai/code/session_01L6bhgWL2r2CuFr34ENybDB
Co-authored-by: Claude <noreply@anthropic.com>
…e lg size Up to eight fields, and no columns declared on the form or any section: the dialog draws one field per row in the narrow lg size (672px). This reverses, for such a dialog, the two-column floor of objectui#12521 / #34607 and the two-per-row effect ruling 6204264665 had on its undeclared sections. Nine fields or more, any declared columns, an authored modalSize or a maximized dialog keep the earlier layout. Claude-Session: https://claude.ai/code/session_01L6bhgWL2r2CuFr34ENybDB Co-authored-by: Claude <noreply@anthropic.com>
…e console's stay ModalForm: the switch is offered only on a host-requested create, a save with it on keeps the dialog, empties the form, focuses the first field and saves again, the choice is remembered per object, ⌘↵ and Ctrl+Enter save while Shift/Alt chords do not, the Save button names the shortcut, and the title follows the object's icon. AppContent: a save told to stay neither closes the form nor lands on the new record (ablated: the pin fails when the createMore branch is skipped). Claude-Session: https://claude.ai/code/session_01L6bhgWL2r2CuFr34ENybDB Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgWL2r2CuFr34ENybDB Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgWL2r2CuFr34ENybDB Co-authored-by: Claude <noreply@anthropic.com>
…onent Claude-Session: https://claude.ai/code/session_01L6bhgWL2r2CuFr34ENybDB Co-authored-by: Claude <noreply@anthropic.com>
…keeps ruling 6204264665 Claude-Session: https://claude.ai/code/session_01L6bhgWL2r2CuFr34ENybDB Co-authored-by: Claude <noreply@anthropic.com>
…d at collection Claude-Session: https://claude.ai/code/session_01L6bhgWL2r2CuFr34ENybDB Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Posted 2026-11-21T10:33Z. The brief handed to the isolated declaration-face reviewer for PR #36038 (owed by the changeset's Contract review brief — PR #36038 @
|
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Contract reviewServed-tier: Face: declaration (owed by the changeset's and the PR body's ① Derived judgmentsPublic-surface changes the diff implies, each checked against the package entries on the head:
The rest of the diff is internal behaviour that its pinned tests cover: the console's ② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS |
… names console and app-shell Claude-Session: https://claude.ai/code/session_01L6bhgWL2r2CuFr34ENybDB Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Contract reviewServed-tier: This is a delta review on the declaration face. It reads only ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS |
…s choice Claude-Session: https://claude.ai/code/session_01L6bhgWL2r2CuFr34ENybDB Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Contract reviewServed-tier: This is the second delta review on the declaration face. It reads only
① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-sales · session_01L6bhgXtcSJVbw8Gny1ERbP 维护者速读
席位核对 — ACCEPT (L1-c) · repo:objectstack#1 · head
|
…into claude/project-thread-fpkoyo
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Regen-provenance: declaration-face record 7061875147 (delta PASS) ·
|
|
repo:objectstack#1 · os-sales · session_01L6bhgXtcSJVbw8Gny1ERbP 维护者速读
席位核对 — ACCEPT (L1-c) · repo:objectstack#1 · head
|
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Seat landing · 2026-11-21T12:14Z · The b1-CX PR for #35980: dialogs share one surface (radius, padding, header and footer), a create dialog lays out six fields or fewer in a single column (the maintainer's ruling 7061696632), and the create dialog offers 「保存并新建」. |
Requested by Sales · project thread
repo:objectstack#1 · os-sales · session_01L6bhgWL2r2CuFr34ENybDB
Fixes #35980
Clause-②: yes (widening):
ModalFormSchema(exported from the@object-ui/plugin-formentry) gains the optionalcreateMore?: boolean, andonSuccessgains an optional second argument{ createMore?: boolean }, measured on the builtdist/ModalForm.d.ts;@object-ui/i18n's packs gain the keyform.createMore. Nothing is removed or narrowed.Metadata-protocol: none
维护者速读
[role="dialog"]圆角规则和遮罩模糊规则删掉了。侧边抽屉、弹出菜单不变。What changes
One dialog surface (
@object-ui/components)src/lib/dialog-surface.tsholds the look:DIALOG_OVERLAY_SURFACE(bg-black/10,dark:bg-black/40, no blur),DIALOG_CONTENT_SURFACE(theme card colour, hairlineborder-black/[0.07]/dark:border-white/[0.09],sm:rounded-[12px], a 3px translucent outer band drawn as the first shadow so a dialog that clips its overflow cannot cut it, then three soft shadows), andDIALOG_COMPACT_CONTROLS(fromsmup, anything drawn at the shared 40px control height draws at 32px; the phone sheet keeps itsmax-sm:44px targets).ui/dialog.tsxandui/alert-dialog.tsxare Shadcn-synced, so they reach the look through declared patches inui/scripts/shadcn-local-patches.mjs: one import and one class token each on the overlay and the content (dialogSurfacePatches, six patches). The surface classes come before the call site'sclassName, so a caller still wins.alert-dialoghad no declared patches; its upstream registry file is vendored as a fixture (alert-dialog.registry.txt, pinned sha256, round-trip checked) likedialog's.shadcn-components.jsonlists both local edits.custom/mobile-dialog-content.tsx(the form dialog's content) appends the same surface.Console global CSS (
apps/console/src/index.css)[role="dialog"]:not(.inset-y-0) { border-radius: 1.25rem !important }rule is gone. Popovers (Radix popover content isrole="dialog") and the vaul bottom drawer keep their 20px corner through their own containers:[data-radix-popper-content-wrapper] > [role="dialog"], [data-vaul-drawer]..dialog-surface, because the card draws its own.bg-black/80overlay blur rule stays but now reaches only drawer overlays: dialog overlays no longer carrybg-black/80.The form dialog (
@object-ui/plugin-form,ModalForm.tsx)text-base) with the object's icon (resolveIcon(objectSchema.icon),aria-hidden); header, body and footer padding 20px fromsmup; the footer bar is the card colour, not the page grey.schema.createMore === trueon acreatedialog shows a switch in the footer. On, a save callsonSuccess(result, { createMore: true }), clears the form (a keyed remount), clears the dirty flag and puts focus on the first editable field; the dialog stays open. Off, nothing changes. The switch is stored per object inlocalStorage(modal-form-create-more:<object>, every access guarded), so it is remembered per object in this browser.requestSubmit, so validation runs), unless a submit or an upload is in flight or the IME is composing. The submit button carriesaria-keyshortcutsand shows the keycaps fromsmup.3612541e, set to six ine86a699e):dialogDrawsSingleColumn(fieldCount, formColumns, sectionColumns)inautoLayout.tsis true when the laid-out field count is at most six (DIALOG_SINGLE_COLUMN_MAX_FIELDS, ruling 7061696632) and neither the form nor any section declarescolumns. Then the dialog takesinferModalSize(1)(lg) and the undeclared columns are 1. Not on a maximized dialog, not whenmodalSizeis authored. Neither helper is on the package entry.Console host (
@object-ui/app-shell,AppContent.tsx)createMore: true.handleRecordFormSuccess(saved, outcome)withoutcome.createMoreshows the saved toast and bumps the list's refresh key (not for a child task, which refreshes its own related list), and returns without closing or opening the new record. Without it, the record opens as before.The
object-formrenderer (ObjectFormContainer,formType: 'modal'): passescreateMore: false, so a page schema's straycreateMore(the schema's index signature would carry it through the spread) never turns the switch on; 「Create more」 is a host's opt-in onModalFormonly.Strings:
form.createMorein all eleven packs (zh-Hant.tsregenerated bygen:zh-hant), plus the provider-less default inModalForm.Why
Card #35980 (epic #34571): the dialogs read heavy against the page (a blurred 35% overlay, a grey card at 20px, 40px controls, two columns for a four-field form), and a person entering several records had to reopen the dialog each time. The card asks for one lighter surface owned by the dialog components, a narrow column for short forms, and a create dialog that can stay open.
Side effects reviewers should know
The compact-controls rule reaches every
h-10element inside a dialog (inputs, select triggers, default and icon buttons, and any other 40px element such as an avatar), not only form controls; a non-square one also gainspy-1. The changeset says so.「⌘↵」 and 「Create more」 are on the flat form only; the master-detail dialog (lines) takes neither. The changeset says so.
The
dialog-surfaceclass is a contract between@object-ui/componentsand the console'sindex.css; both sides carry a comment naming the other.Top and bottom sheets and any custom element with
role="dialog"that relied on the old global 20px rule now draw their own corner (bottom drawer and popovers keep 20px through the rule above; the edge-sheet test pins left, right, top and bottom).The outer band is a shadow, with no backdrop blur of its own.
Drawer overlays are unchanged.
Tests
apps/console/src/__tests__/edgeSheetSquareCorners-35411.test.tsx: the corner selector names the popper wrapper and the vaul drawer and no part starts with[role="dialog"]; no sheet side is matched; a centred dialog is not matched and carriessm:rounded-[12px].scripts/__tests__/shadcn-local-patches.test.ts: the alert-dialog fixture entry; the pinnedappliedcount in the dialog-Close drift test is 2 → 5 (three new dialog patches).dialogDefaultLayout-12521.test.tsx(the short form has no grid; thespan: 'full'case uses a nine-field section and still expects the wide ladder),dialogContainerColumns-34607.test.tsx(the light form islgwith ladder [1,1,1]; new describe with 7 cases: the predicate (6 → one column; 7, 8, 9 → not); six flat fields → one columnlg; seven → as before (xl, two columns); undeclared sections of six in all → one column; a declared formcolumnsas written; one declared section keeps the dialog as it was; an authoredmodalSizewins),fieldGroupSections.test.tsx(host-aware: the modal draws no@md:grid-cols-2, the drawer still does),modalFieldGroups.test.tsx.subformHosts.test.tsx(bg-card,sm:px-5),snapshot-critical.test.tsx.snap(dialog classes),FormSectionNav.test.tsx(the header-border check waits for layout; timing only).modalMaximize-34604.test.tsxdescribe 「Create more」 with 10 cases (switch only when the host asks and only on a create; anobject-formpage schema that writescreateMorethroughObjectFormContainergets no switch (fails with the container'screateMore: falseremoved); off → closes and the host is not told to stay; on → stays open, form empty, focus first, saves again; reopens as last left, per object; ⌘↵ and Ctrl+Enter save, Shift or a lone Enter do not; the keycaps; the title icon; no icon → title alone).AppContent.createLandingOriginPlural-11733.test.tsx: create-more stays on the list and refreshes it (fails with theoutcome.createMorebranch removed).@object-ui/plugin-form2,723 passed before the new pins, then the changed and new files (modalMaximize-3460420 passed, the width files, the host-parity files) passed;@object-ui/components1 failure, the dialog snapshot, regenerated in6e8a3744;scripts/__tests__/shadcn-local-patches.test.tspassed.type-check(src and tests) clean for plugin-form, components and app-shell; ESLint on every changed file: no errors. Aftere86a699e:@object-ui/plugin-form2,732 passed / 1 skipped.@object-ui/console3,470 passed;@object-ui/fields4,717 passed / 7 skipped; the@object-ui/app-shellsuite outran the local 25-minute limit, and CI's Test UI (16 shards, green on2019d2ce) is its reading.Browser evidence (CRM example, console, zh-CN)
Before and after screenshots:
/mnt/project-files/build-seat1/35980/before/andafter/(seat-side folder; scriptshots.cjs,flows.cjs).be91bfc2)rgb(246,246,249), overlay 35% +blur(8px) saturate(1.4), controls 40, title 18rgb(24,24,27), overlay 40%, no backdrop filtercrm_lead), 1280sm:rounded-lg; the old global rule matchedrole="dialog", notalertdialog)rgb(24,24,27), buttons 32crm_contactlocally, not committed)crm_accountlocally, not committed; at six, eight fields draw two columns as before)Human Minimum
packages/specholds no runtime logic. (not touched)pnpm lintpasses.main, one pull request.packages/spectouched: n/a.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgWL2r2CuFr34ENybDB